#include "BDD.h"

void ex3(struct graph *g)
{
	vertex *temp1, *temp2;
	char variable[1000];
	init(g);
        strcpy(variable,"a");
	g->root = (vertex *)insertVertex(3,1,variable,1);
        strcpy(variable,"b");
	g->root->low = (vertex *)insertVertex(3,2,variable,2);
        strcpy(variable,"b");
	g->root->high = (vertex *)insertVertex(3,2,variable,3);

        strcpy(variable,"d");
	temp1 = g->root->low->low = (vertex *)insertVertex(3,4,variable,4);
        strcpy(variable,"f");
	g->root->low->low->low = (vertex *)insertVertex(0,6,variable,5);
        strcpy(variable,"e");
	temp2 = g->root->low->low->high = (vertex *)insertVertex(3,5,variable,6);

        strcpy(variable,"h");
	g->root->low->low->high->low = (vertex *)insertVertex(1,6,variable,7);
        strcpy(variable,"g");
	g->root->low->low->high->high = (vertex *)insertVertex(0,6,variable,8);

        strcpy(variable,"c");
	g->root->low->high = (vertex *) insertVertex(3,3,variable,9);
	g->root->low->high->low = temp2;
        strcpy(variable,"i");
	g->root->low->high->high = (vertex *) insertVertex(1,6,variable,10);

        strcpy(variable,"b");
	g->root->high = (vertex *)insertVertex(3,2,variable,11);
        strcpy(variable,"b");
	g->root->high = (vertex *)insertVertex(3,2,variable,12);
	g->root->high->low = temp1;
        strcpy(variable,"c");
	g->root->high->high = (vertex *)insertVertex(3,3,variable,13);


	g->root->high->high->low = temp2;
	strcpy(variable,"j");
	g->root->high->high->high =(vertex *)insertVertex(0,6,variable,14);

}
